package com.project.forlearning.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.util.Date;

@ApiModel("resource资源对象")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Resource {

    @ApiModelProperty("resource_id 资源编号")
    private Integer resourceId;

    @ApiModelProperty("title 资源名称(<20)")
    private String title;

    @ApiModelProperty("introduction 描述(<30)")
    private String introduction;

    @ApiModelProperty("url 资源地址")
    private String url;

    @ApiModelProperty("labels 标签")
    private String labels;

    @ApiModelProperty("icon 图标（存储地址）")
    private String icon;

    @ApiModelProperty("details 详情")
    private String details;

    @ApiModelProperty("collectionNum 收藏量")
    private Integer collectionNum;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("fTime 发布时间（自动生成）")
    private Date fTime;

    @ApiModelProperty("user 发布用户(自动生成)")
    private Integer userId;

    @ApiModelProperty("浏览量（存储在redis中，快速增加）")
    private Integer scanNum;

    @ApiModelProperty("评价等级")
    private Integer starNum;

    @ApiModelProperty("资源状态")
    private String status;
}
